package com.foreknow.dao;

import com.foreknow.model.Admin;

import java.sql.SQLException;
import java.util.List;

public interface AdimDao {
    /**
     * 添加
     * @param admin
     * @return
     * @throws Exception
     */
    public boolean save(Admin admin)throws Exception;

    /**
     * 查询
     * @return
     * @throws SQLException
     */
    public List<Object> getQueryAll()throws SQLException;

    /**
     * 按id查询
     * @param id
     * @return
     * @throws SQLException
     */
    public Admin getQueryById(int id)throws SQLException;

    /**
     * 按id删除
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean deleteById(int id)throws SQLException;
}
